<!doctype html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title>我的维修预约记录</title>
<link href="../../css/newStyle.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../../js/common.js"></script>
<script type="text/javascript" src="../../js/gbRst.js"></script>
<script type="text/javascript" src="../../js/utils.js"></script>
<script type="text/javascript" src="../../js/openId.js"></script>
<script type="text/javascript" src="../../js/header&footer.js"></script>
<!-- <script type="text/javascript" src="../../js/carService.js"></script>
 --><script type="text/javascript" src="../../js/doubleDate2.0.js"></script>
<script type="text/javascript" src="../../js/check.js"></script>
<script type="text/javascript" src="../../js/qmsk-1.2.js"></script>
<script type="text/javascript">
$(function(){
	for(var i=0,attrDet=[];i<$(".messageAbb").length;i++){
		attrDet.push($(".messageAbb").eq(i).html());
	}//存储商品详情
	for(var i=0;i<$(".messageAbb").length;i++){
		$(".messageAbb").eq(i).html($(".messageAbb").eq(i).html().substr(0,40)+"…");	
	}
	$(".messageAbb").click(function(){
		if($(this).hasClass("showAbb")){
			$(this).html($(this).html().substr(0,40)+"…");
			$(this).removeClass("showAbb");
		}else{
		var index=$(".messageAbb").index(this);
		$(this).html(attrDet[index]);	
		$(this).addClass("showAbb");
		}
	})//精简显示消息
	
	getRecord()
})

function getRecord(){
	 new qmsk.SiglePinterest({
			url : '../../../overServiceRecord/find/overServiceList', // 请求地址，插件会自动在 url 后追加 /n/n
			initPage : 1, // 首次加载页数
			size : 10, // 每次加载数量，即每页的大小
			success : printDataToPage, // 成功回调
			valves : 100 ,//当滚动条距离底部该像素的时候加载
			data:{'shopId':_shopId,'openId':_openId},
			loading : addRefresh2,
			loaded : delRefresh,
			emptyHandler :showNoResult

		});
}

function showNoResult(){
	$("#noResult").show()
}

function printDataToPage(dt){
	for ( var i = 0; i < dt.row; i++) {
		var status= dt.getValue("status",i);
		var doType =null
		var result = "";
		var xil = "";
		if(status==0){
		 doType ="<input type=\"button\" class=\"del\" value=\"取消预约\" onclick=\"showTestDel("+dt.getValue("id",i)+")\">"
			
		}else{
			 xil  =" <div class=\"autoArrows\"></div>"
			 doType =" 已完成"
		 result = "<div class=\"record replyWorker\"><article class=\"source\"><strong></strong><span class=\"thisName\">"+dt.getValue("replylDate",i)+"</span></article><p>回复结果：<span>"+dt.getValue("reply",i)+"</span></p></div>"

		}
		var htm  = "<div id='record_"+dt.getValue("id",i)+"' class=\"replyBox\"><div class=\"record\"><article class=\"source\"><span class=\"thisName\">"+dt.getValue("submitDate",i)+"</span></article><p>预约售后顾问：<span>"+dt.getValue("userName",i)+"</span></p><p>预约时间：<span>"+dt.getValue("OrderDate",i).substring(0,10)+" "+dt.getValue("timeName",i)+"</span></p><p>备注：<span>"+dt.getValue("memo",i)+"</span></p>"+
		"<article class=\"source\">"+doType+"</article>"+xil+"</div>"+result+"</div>"
		$("#info").append(htm)
	}
	
}


function deleteInfo(id){
	var dt = _deleteInfo("../../../overServiceRecord/del", {"id":id});
	if(IsNotEmpty(dt)&&dt.state==0){
		$("#record_"+id).remove();
	}
	
}
</script>
</head>

<body class="bgShade">
<div class="wrapper">
  <div class="container" id="info">
  <div class="placeTit"><a href="javascript:history.go(-1)" class="back"></a>我的维修预约记录</div>
	<div class="noData" id="noResult" style="display: none;">
  <p class="Datatips">您还没有预约过哦！</p>
</div><!-- <div class="record">
        <article class="source"><span class="thisName">2014-03-15</span></article>
    	<p>推荐客户姓名：<span>冰-39</span></p>
    	<p>推荐客户电话：<span>15021103201</span></p>
    	<p>推荐类型：<span>维修</span></p>
        <p>备注：<span>备注一备注一备注一备注，一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备，注一备注一备注一备注一备注一备注一备注一备注一备注一</span></p>
        <article class="source"><input type="button" class="del" value="删除"></article>
    </div>
	<div class="record">
        <article class="source"><span class="thisName">2014-03-15</span></article>
    	<p>推荐客户姓名：<span>冰-39</span></p>
    	<p>推荐客户电话：<span>15021103201</span></p>
    	<p>推荐类型：<span>维修</span></p>
        <p>备注：<span>备注一备注一备注一备注，一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备，注一备注一备注一备注一备注一备注一备注一备注一备注一</span></p>
        <article class="source"><input type="button" class="del" value="删除"></article>
    </div>
	<div class="record">
        <article class="source"><span class="thisName">2014-03-15</span></article>
    	<p>推荐客户姓名：<span>冰-39</span></p>
    	<p>推荐客户电话：<span>15021103201</span></p>
    	<p>推荐类型：<span>维修</span></p>
        <p>备注：<span>备注一备注一备注一备注，一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备，注一备注一备注一备注一备注一备注一备注一备注一备注一</span></p>
        <article class="source"><input type="button" class="del" value="删除"></article>
    </div> -->
  </div>
</div>
</body>
</html>
